{% set map = salt['grains.filter_by']({
    'Debian': {
        'pkgs': ['bind9', 'bind9utils', 'dnssec-tools'],
        'service': 'bind9',
        'config_source_dir': 'bind/files/debian',
        'zones_source_dir': 'zones',
        'config': '/etc/bind/named.conf',
        'local_config': '/etc/bind/named.conf.local',
        'key_config': '/etc/bind/named.conf.key',
        'options_config': '/etc/bind/named.conf.options',
        'default_config': '/etc/default/bind9',
        'default_zones_config': '/etc/bind/named.conf.default-zones',
        'named_directory': '/var/cache/bind/zones',
        'log_dir': '/var/log/bind9',
        'log_mode': '644',
        'user': 'root',
        'group': 'bind',
        'mode': '644'
    },
    'RedHat': {
        'pkgs': ['bind'],
        'service': 'named',
        'config_source_dir': 'bind/files/redhat',
        'zones_source_dir': 'zones',
        'config': '/etc/named.conf',
        'local_config': '/etc/named.conf.local',
        'default_config': '/etc/sysconfig/named',
        'named_directory': '/var/named/data',
        'log_dir': '/var/log/named',
        'log_mode': '640',
        'user': 'root',
        'group': 'named',
        'mode': '640'
    },
    'Arch': {
        'pkgs': ['bind', 'bind-tools', 'dnssec-tools'],
        'service': 'named',
        'config_source_dir': 'bind/files/arch',
        'zones_source_dir': 'zones',
        'config': '/etc/named.conf',
        'local_config': '/etc/named.conf.local',
        'named_directory': '/var/named',
        'log_dir': '/var/log/named',
        'log_mode': '640',
        'user': 'root',
        'group': 'named',
        'mode': '640'
    },
    'FreeBSD': {
        'pkgs': ['bind99'],
        'service': 'named',
        'config_source_dir': 'bind/files/freebsd',
        'zones_source_dir': 'zones',
        'config': '/usr/local/etc/namedb/named.conf',
        'local_config': '/usr/local/etc/namedb/named.conf.local',
        'named_directory': '/usr/local/etc/namedb/working',
        'log_dir': '/var/log/named',
        'log_mode': '660',
        'user': 'root',
        'group': 'bind',
        'mode': '640'
    },
}, merge=salt['grains.filter_by']({
    'jessie': {
        'pkgs': ['bind9', 'bind9utils'],
    },
}, grain='oscodename', merge=salt['grains.filter_by']({
    'Ubuntu': {
        'log_dir': '/var/log/named',
        'user': 'bind'
    },
}, grain='os', merge=salt['pillar.get']('bind:lookup')))) %}
